package com.typhoon.configuation;

import org.springframework.beans.factory.annotation.Qualifier;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.jdbc.core.JdbcTemplate;

import javax.sql.DataSource;

/**
 * @author shuya | dongfeng.zdf@alibaba-inc.com
 * @description
 * @date 2018/10/10 下午8:43
 * @description
 * @modified by
 * @since V2.0.0
 */
@Configuration
public class CommonConfiguration {

    @Bean
    public JdbcTemplate jdbcTemplate(@Qualifier("hikariDataSource") DataSource dataSource) {
        JdbcTemplate jdbcTemplate = new JdbcTemplate(dataSource);
        return jdbcTemplate;
    }
}
